/*
 * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved.
 */
package com.wlh.animation;

import com.wlh.animation.view.TouchTestFrameLayout;
import com.wlh.animation.view.TouchTestLinearLayout;
import com.wlh.animation.view.TouchTestView;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.MotionEvent;
import android.view.View;

/**
 * @author weilh
 *         <b>DATE</b> 2016/7/26.
 */
public class TouchDemoAct extends AppCompatActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_touch_demo);
//        TouchTestLinearLayout mRootView, mParentView;
//        TouchTestView mView;
//        mRootView = (TouchTestLinearLayout) findViewById(R.id.root);
//        mParentView = (TouchTestLinearLayout) findViewById(R.id.parent);
//        mView = (TouchTestView) findViewById(R.id.view);
//        mRootView.setName("C");
//        mParentView.setName("B");
//        mParentView.setInterceptTouch(true);
//        mView.setName("A");
//
//        mView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//
//            }
//        });


        setContentView(R.layout.activity_touch_demo2);
        TouchTestView view1, view2;
        TouchTestFrameLayout rootView;
        view1 = (TouchTestView) findViewById(R.id.view1);
        view2 = (TouchTestView) findViewById(R.id.view2);
        rootView = (TouchTestFrameLayout) findViewById(R.id.root);

        view1.setName("B");
        view2.setName("A");
        rootView.setName("C");

        view2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
    }

}
